package com.infore.remoteControl.repository;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.infore.remoteControl.entity.instructionsEntity.Instructions;


@Repository
public interface IInstructionRepository extends JpaRepository<Instructions, String>, JpaSpecificationExecutor<Instructions>{
	
	/** 删除 **/
	@Modifying
	@Transactional
	int deleteByInstructionsIdIn(List<String> ids);
	/** 分页查询(指令序号排序) **/
	Page<Instructions> findByOrderByNumbers(Pageable pageable);
	/** 指令序号 **/
	List<Instructions> findByOrderByNumbers();
	/** 根据指令名称查询 **/
	List<Instructions> findByName(String name);
	/** 根据指令编号查询 **/
	List<Instructions> findByCode(String code);
}
